package com.mtf.io;

/**
 * @Author matengfei
 * @Date 2024/5/27 17:40
 * @PackageName:com.mtf.io
 * @ClassName: Test
 * @Description: TODO
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Test test = new Test();
        test = null;
        System.gc(); // 手动回收垃圾
    }

    @Override
    protected void finalize() throws Throwable {
        // gc回收垃圾之前调用
        System.out.println("gc回收垃圾之前调用的方法");
    }
}
